package com.flyduck.vueshop.system.constant;

/**
 * @program: vueshop
 * @description:
 * @author: flyduck
 * @create: 2024-06-02 09:25
 **/
public class SysConstant {
    public static final String DEFAULT_PASSWORD = "888888";
    public static final String DEFAULT_AVATAR = "https://image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/5a9f48118166308daba8b6da7e466aab.jpg";

    public static class RedisConstant {

        public static final String LOGIN_CAPTCHA_KEY = "login:captcha";
        public static final Integer LOGIN_CAPTCHA_EXPIRE = 120;

        public static final String USER_PERMISSIONS_KEY = "user:permissions:";
        public static final Integer USER_PERMISSIONS_EXPIRE = 60 * 60;//一小时
    }

    public static enum CommonStatus  {
        ENABLE(0, "启用"),
        DISABLE(1, "禁用");

        private int code;
        private String description;

        CommonStatus (int code, String description) {
            this.code = code;
            this.description = description;
        }

        public int getCode() {
            return code;
        }
    }

    public static enum MenuType{
        DIRECTORY(0, "目录"),
        MENU(1, "菜单"),
        BUTTON(2, "按钮");

        private int code;
        private String description;

        MenuType(int code, String description) {
            this.code = code;
            this.description = description;
        }

        public int getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }
}
